home *** CD-ROM | disk | FTP | other *** search
- Global fname As String
- Global dirtyflag As Integer
-
- Global Const OK = 0
- Global Const ABORTRETRYIGNORE = 2
- Global Const YESNOCANCEL = 3
- Global Const YESNO = 4
-
- Global Const RETRYCANCEL = 5
-
- Global Const CRITICAL = 16
- Global Const WARNINGQUERY = 32
- Global Const WARNINGMESSAGE = 48
-
- Global Const FIRSTBUTTON = 0
- Global Const SECONDBUTTON = 256
-
- Global Const MODAL = 1
-
- Global Const KEYCANCEL = 2
- Global Const KEYABORT = 3
- Global Const KEYRETRY = 4
- Global Const KEYIGNORE = 5
- Global Const KEYYES = 6
- Global Const KEYNO = 7
-
- Global Const DEFAULT = 0
- Global Const HOURGLASS = 11
-
- Function DealWithDriveError (ErrorCode As Integer) As Integer
- Dim msgtype As Integer
- Dim mymsg As String
- Dim msgtitle As String
-
- Dim KeyPressed As Integer
-
- 'Determine the File Error
- Select Case ErrorCode
- Case 68, 76 'Device Unavailable
- mymsg = " Drive Not Ready "
- msgtype = ABORTRETRYIGNORE + WARNINGMESSAGE
- msgtitle = "DRIVE ERROR"
- Case Else ' Any other error
- mymsg = "Some other error " + Str$(ErrorCode) + " " + Error$
- msgtype = OK
- msgtitle = "Unknown Error"
- End Select
-
- KeyPressed = MsgBox(mymsg, msgtype, msgtitle)
- DealWithDriveError = KeyPressed
-
- End Function
-
-